package sk.fei.vrml.objects;

public class MaterialObject {
    public float diffuseColor[];
    public float ambientIntensity;
    public float emissiveColor[]; 
    public float specularColor[];
    public float shininess; 
    public float transparency;
    public String name;
    
    public MaterialObject() {
    	
    }
    
	public MaterialObject(float diffuseColor[], float ambientIntensity,
			float emissiveColor[], float specularColor[], float shininess,
			float transparency) {
		super();
		this.diffuseColor = diffuseColor;
		this.diffuseColor[3] = (float)1-transparency;
		this.ambientIntensity = ambientIntensity;
		this.emissiveColor = emissiveColor;
		this.emissiveColor[3] = (float)1-transparency;
		this.specularColor = specularColor;
		this.specularColor[3] = (float)1-transparency;
		this.shininess = shininess;
		this.transparency = (float)1-transparency;
	} 
	
	public float getAmbientIntensity() {
		return ambientIntensity;
	}
	
	public float[] getDiffuseColor() {
		return diffuseColor;
	}
	
	public float[] getEmissiveColor() {
		return emissiveColor;
	}
	
	public float getShininess() {
		return shininess;
	}
	
	public float[] getSpecularColor() {
		return specularColor;
	}
	
	public float getTransparency() {
		return (float)1-transparency;
	}
	
	public void setAmbientIntensity(float ambientIntensity) {
		this.ambientIntensity = ambientIntensity;
	}
	
	public void setDiffuseColor(float[] diffuseColor) {
		this.diffuseColor[0] = diffuseColor[0];
		this.diffuseColor[1] = diffuseColor[1];
		this.diffuseColor[2] = diffuseColor[2];
		this.diffuseColor[3] = diffuseColor[3];
	}
	
	public void setEmissiveColor(float[] emissiveColor) {
		this.emissiveColor[0] = emissiveColor[0];
		this.emissiveColor[1] = emissiveColor[1];
		this.emissiveColor[2] = emissiveColor[2];
		this.emissiveColor[3] = emissiveColor[3];
	}
	
	public void setShininess(float shininess) {
		this.shininess = shininess;
	}
	
	public void setSpecularColor(float[] specularColor) {
		this.specularColor[0] = specularColor[0];
		this.specularColor[1] = specularColor[1];
		this.specularColor[2] = specularColor[2];
		this.specularColor[3] = specularColor[3];
		//System.out.println(specularColor[3]);
	}
	
	public void setTransparency(float transparency) {
		this.transparency = transparency;
	}
	
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
}
